import QtQuick 2.0
import "./Keyboard"
import "content"
import CustomComponents 1.0

Rectangle {
    id:root
    signal enter()
    width: parent.width/3
    height: parent.height/3
    anchors.centerIn: parent
    border.color: "red"
    radius: 5
    color:Qt.rgba(255,255,25,1)
    Component.onCompleted: {
        time.interval=100
    }
    Text{
        id:labal
        text: ""
        y:root.height/3
        anchors.horizontalCenter: parent.horizontalCenter
    }

    Progressbar {
        id: progress
        anchors.centerIn: parent
        anchors.horizontalCenter: parent.horizontalCenter
        width: width -50
        height: 12
        color: "red"
        value: 35
        onComple: {
            labal.text="Comple"
            progress.visible=false;
            b1.visible= true;
            b1.enabled= true;
        }
        Timer{
            id:time
            e: 0
            interval: 3000
            onOut: {

                // console.log( "Timer fired!" );
                if( progress.value<100){
                    labal.text="Process"
                    console.debug( progress.value)
                    progress.value=progress.value+1
                }
            }
        }
    }
    Button{
        id:b1
        visible: false
        enabled: false
        anchors.centerIn: parent
        label: "OK"
        onClicked: {
            root.enter();
            progress.value=0;
            visible= false;
            enabled= false;
            progress.visible=true;
        }
    }


}
